import pandas as pd
import json


f=open('../data_new/total_data_xulie_multichain.json','r',encoding='utf-8')
f1=open('../data_new/data_cctx_xulie_multichain.txt',"w",encoding='utf-8')
content=f.read()
f.close()
data_list=json.loads(content)

print(type(data_list))

print(len(data_list))


for dict_data in data_list:
    dict_data_tem={}
    for key_1,value_1 in dict_data.items():
        if (key_1=="Lock_event"):
            string=""
        if(isinstance(value_1,dict)):
            string+=f"{key_1}=("
            for key_2,value_2 in value_1.items():
                string+=f"{key_2}:{value_2} "
            string+=")  "
    type=dict_data["Type"]
    string+=f',{type}'
    print(string)
    f1.write(string+'\n')


f.close()
f1.close()



